package kuangjia01;

import day06.Dog;

/**
 * Created by Shinelon on 2016/9/27.
 */
public class Second {
    public static void main(String[] args) {
        String b = "think in java";
        System.out.println(b.charAt(12));//

        System.out.println(b.indexOf("in"));
        System.out.println(b.substring(2, 7));
        System.out.println(b.length());

        System.out.println(b.concat(" bbb"));
        System.out.println(b + " bbb");

        System.out.println(b.contains("jaba"));
        System.out.println(b.endsWith("jaba"));
        System.out.println(b.startsWith("thinj"));
        System.out.println(b.equals("think in java"));
        System.out.println(b == "think in java");
        System.out.println(b == new String ("think in java"));

        for (byte b1 : b.getBytes()) {
            System.out.println(b1);
        }

        System.out.println(new String(b.getBytes()));
        }
    }

